package com.example.projecth.project3;

import com.example.projecth.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;

public class IntroActivity extends Activity {
	
	private boolean loading;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.bjhintro);
		
		
		(new Thread() {
			public void run() {
				loading = true;
				try {
					Thread.sleep(3000);
				} catch (Exception ex) {}
				
				if (loading == true) {
				Intent intent = new Intent(IntroActivity.this, MainActivity.class);
				startActivity(intent);
				finish();
				}
			}
		}).start();
	
		
	}
	
	@Override
	public void onBackPressed() {
		loading = false;
		super.onBackPressed();
	}

}
